package org.geekbang.thinking.in.spring.conversion.event;

import org.hibernate.annotations.Comment;
import org.springframework.context.ApplicationListener;
import org.springframework.context.event.ContextClosedEvent;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;

@Component
@Order(1)
public class ContextClosedEventListener implements ApplicationListener<ContextClosedEvent> {

    @Override
    public void onApplicationEvent(ContextClosedEvent event) {
        // 处理上下文关闭事件的逻辑
        System.out.println("[ApplicationListener]ApplicationContext closed.");
    }
}